3.817 \(\int \frac{1}{(d+e x) (f+g x) \left (a+b x+c x^2\right )} \, dx\)

Optimal. Leaf size=246 \[ -\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-c (2 a e g+b d g+b e f)+b^2 e g+2 c^2 d f\right )}{\sqrt{b^2-4 a c} \left (a e^2-b d e+c d^2\right ) \left (c f^2-g (b f-a g)\right )}-\frac{\log \left (a+b x+c x^2\right ) (-b e g+c d g+c e f)}{2 \left (a e^2-b d e+c d^2\right ) \left (c f^2-g (b f-a g)\right )}+\frac{e^2 \log (d+e x)}{(e f-d g) \left (a e^2-b d e+c d^2\right )}-\frac{g^2 \log (f+g x)}{(e f-d g) \left (a g^2-b f g+c f^2\right )} \]

[Out]

-(((2*c^2*d*f + b^2*e*g - c*(b*e*f + b*d*g + 2*a*e*g))*ArcTanh[(b + 2*c*x)/Sqrt[
b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(c*d^2 - b*d*e + a*e^2)*(c*f^2 - g*(b*f - a*g)
))) + (e^2*Log[d + e*x])/((c*d^2 - b*d*e + a*e^2)*(e*f - d*g)) - (g^2*Log[f + g*
x])/((e*f - d*g)*(c*f^2 - b*f*g + a*g^2)) - ((c*e*f + c*d*g - b*e*g)*Log[a + b*x
 + c*x^2])/(2*(c*d^2 - b*d*e + a*e^2)*(c*f^2 - g*(b*f - a*g)))

_______________________________________________________________________________________

Rubi [A]  time = 0.923651, antiderivative size = 246, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.185 \[ -\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-c (2 a e g+b d g+b e f)+b^2 e g+2 c^2 d f\right )}{\sqrt{b^2-4 a c} \left (a e^2-b d e+c d^2\right ) \left (c f^2-g (b f-a g)\right )}-\frac{\log \left (a+b x+c x^2\right ) (-b e g+c d g+c e f)}{2 \left (a e^2-b d e+c d^2\right ) \left (c f^2-g (b f-a g)\right )}+\frac{e^2 \log (d+e x)}{(e f-d g) \left (a e^2-b d e+c d^2\right )}-\frac{g^2 \log (f+g x)}{(e f-d g) \left (a g^2-b f g+c f^2\right )} \]

Antiderivative was successfully verified.

[In]  Int[1/((d + e*x)*(f + g*x)*(a + b*x + c*x^2)),x]

[Out]

-(((2*c^2*d*f + b^2*e*g - c*(b*e*f + b*d*g + 2*a*e*g))*ArcTanh[(b + 2*c*x)/Sqrt[
b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(c*d^2 - b*d*e + a*e^2)*(c*f^2 - g*(b*f - a*g)
))) + (e^2*Log[d + e*x])/((c*d^2 - b*d*e + a*e^2)*(e*f - d*g)) - (g^2*Log[f + g*
x])/((e*f - d*g)*(c*f^2 - b*f*g + a*g^2)) - ((c*e*f + c*d*g - b*e*g)*Log[a + b*x
 + c*x^2])/(2*(c*d^2 - b*d*e + a*e^2)*(c*f^2 - g*(b*f - a*g)))

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(e*x+d)/(g*x+f)/(c*x**2+b*x+a),x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 0.653152, size = 246, normalized size = 1. \[ \frac{\tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right ) \left (-c (2 a e g+b d g+b e f)+b^2 e g+2 c^2 d f\right )}{\sqrt{4 a c-b^2} \left (e (a e-b d)+c d^2\right ) \left (g (a g-b f)+c f^2\right )}+\frac{e^2 \log (d+e x)}{(e f-d g) \left (e (a e-b d)+c d^2\right )}-\frac{\log (a+x (b+c x)) (-b e g+c d g+c e f)}{2 \left (e (a e-b d)+c d^2\right ) \left (g (a g-b f)+c f^2\right )}-\frac{g^2 \log (f+g x)}{(e f-d g) \left (g (a g-b f)+c f^2\right )} \]

Antiderivative was successfully verified.

[In]  Integrate[1/((d + e*x)*(f + g*x)*(a + b*x + c*x^2)),x]

[Out]

((2*c^2*d*f + b^2*e*g - c*(b*e*f + b*d*g + 2*a*e*g))*ArcTan[(b + 2*c*x)/Sqrt[-b^
2 + 4*a*c]])/(Sqrt[-b^2 + 4*a*c]*(c*d^2 + e*(-(b*d) + a*e))*(c*f^2 + g*(-(b*f) +
 a*g))) + (e^2*Log[d + e*x])/((c*d^2 + e*(-(b*d) + a*e))*(e*f - d*g)) - (g^2*Log
[f + g*x])/((e*f - d*g)*(c*f^2 + g*(-(b*f) + a*g))) - ((c*e*f + c*d*g - b*e*g)*L
og[a + x*(b + c*x)])/(2*(c*d^2 + e*(-(b*d) + a*e))*(c*f^2 + g*(-(b*f) + a*g)))

_______________________________________________________________________________________

Maple [B]  time = 0.015, size = 606, normalized size = 2.5 \[{\frac{{g}^{2}\ln \left ( gx+f \right ) }{ \left ( dg-ef \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ) beg}{ \left ( 2\,a{e}^{2}-2\,bde+2\,c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }}-{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) dg}{ \left ( 2\,a{e}^{2}-2\,bde+2\,c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }}-{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) ef}{ \left ( 2\,a{e}^{2}-2\,bde+2\,c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }}-2\,{\frac{aceg}{ \left ( a{e}^{2}-bde+c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) \sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{2}eg}{ \left ( a{e}^{2}-bde+c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bcdg}{ \left ( a{e}^{2}-bde+c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bcef}{ \left ( a{e}^{2}-bde+c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) }\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+2\,{\frac{{c}^{2}df}{ \left ( a{e}^{2}-bde+c{d}^{2} \right ) \left ( a{g}^{2}-bfg+c{f}^{2} \right ) \sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{{e}^{2}\ln \left ( ex+d \right ) }{ \left ( dg-ef \right ) \left ( a{e}^{2}-bde+c{d}^{2} \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(e*x+d)/(g*x+f)/(c*x^2+b*x+a),x)

[Out]

g^2/(d*g-e*f)/(a*g^2-b*f*g+c*f^2)*ln(g*x+f)+1/2/(a*e^2-b*d*e+c*d^2)/(a*g^2-b*f*g
+c*f^2)*ln(c*x^2+b*x+a)*b*e*g-1/2/(a*e^2-b*d*e+c*d^2)/(a*g^2-b*f*g+c*f^2)*c*ln(c
*x^2+b*x+a)*d*g-1/2/(a*e^2-b*d*e+c*d^2)/(a*g^2-b*f*g+c*f^2)*c*ln(c*x^2+b*x+a)*e*
f-2/(a*e^2-b*d*e+c*d^2)/(a*g^2-b*f*g+c*f^2)/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(
4*a*c-b^2)^(1/2))*a*c*e*g+1/(a*e^2-b*d*e+c*d^2)/(a*g^2-b*f*g+c*f^2)/(4*a*c-b^2)^
(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2*e*g-1/(a*e^2-b*d*e+c*d^2)/(a*g^2-b
*f*g+c*f^2)/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b*c*d*g-1/(a*e
^2-b*d*e+c*d^2)/(a*g^2-b*f*g+c*f^2)/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^
2)^(1/2))*b*c*e*f+2/(a*e^2-b*d*e+c*d^2)/(a*g^2-b*f*g+c*f^2)/(4*a*c-b^2)^(1/2)*ar
ctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*c^2*d*f-e^2/(d*g-e*f)/(a*e^2-b*d*e+c*d^2)*ln(e
*x+d)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((c*x^2 + b*x + a)*(e*x + d)*(g*x + f)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((c*x^2 + b*x + a)*(e*x + d)*(g*x + f)),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(e*x+d)/(g*x+f)/(c*x**2+b*x+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.268243, size = 529, normalized size = 2.15 \[ \frac{g^{3}{\rm ln}\left ({\left | g x + f \right |}\right )}{c d f^{2} g^{2} - b d f g^{3} + a d g^{4} - c f^{3} g e + b f^{2} g^{2} e - a f g^{3} e} - \frac{{\left (c d g + c f e - b g e\right )}{\rm ln}\left (c x^{2} + b x + a\right )}{2 \,{\left (c^{2} d^{2} f^{2} - b c d^{2} f g + a c d^{2} g^{2} - b c d f^{2} e + b^{2} d f g e - a b d g^{2} e + a c f^{2} e^{2} - a b f g e^{2} + a^{2} g^{2} e^{2}\right )}} - \frac{e^{3}{\rm ln}\left ({\left | x e + d \right |}\right )}{c d^{3} g e - c d^{2} f e^{2} - b d^{2} g e^{2} + b d f e^{3} + a d g e^{3} - a f e^{4}} + \frac{{\left (2 \, c^{2} d f - b c d g - b c f e + b^{2} g e - 2 \, a c g e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (c^{2} d^{2} f^{2} - b c d^{2} f g + a c d^{2} g^{2} - b c d f^{2} e + b^{2} d f g e - a b d g^{2} e + a c f^{2} e^{2} - a b f g e^{2} + a^{2} g^{2} e^{2}\right )} \sqrt{-b^{2} + 4 \, a c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((c*x^2 + b*x + a)*(e*x + d)*(g*x + f)),x, algorithm="giac")

[Out]

g^3*ln(abs(g*x + f))/(c*d*f^2*g^2 - b*d*f*g^3 + a*d*g^4 - c*f^3*g*e + b*f^2*g^2*
e - a*f*g^3*e) - 1/2*(c*d*g + c*f*e - b*g*e)*ln(c*x^2 + b*x + a)/(c^2*d^2*f^2 -
b*c*d^2*f*g + a*c*d^2*g^2 - b*c*d*f^2*e + b^2*d*f*g*e - a*b*d*g^2*e + a*c*f^2*e^
2 - a*b*f*g*e^2 + a^2*g^2*e^2) - e^3*ln(abs(x*e + d))/(c*d^3*g*e - c*d^2*f*e^2 -
 b*d^2*g*e^2 + b*d*f*e^3 + a*d*g*e^3 - a*f*e^4) + (2*c^2*d*f - b*c*d*g - b*c*f*e
 + b^2*g*e - 2*a*c*g*e)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/((c^2*d^2*f^2 - b
*c*d^2*f*g + a*c*d^2*g^2 - b*c*d*f^2*e + b^2*d*f*g*e - a*b*d*g^2*e + a*c*f^2*e^2
 - a*b*f*g*e^2 + a^2*g^2*e^2)*sqrt(-b^2 + 4*a*c))